package com.ayou.eggguard.farm.service.impl;

import com.ayou.common.utils.PageBean;
import com.ayou.eggguard.farm.mapper.ChickenFarmMapper;
import com.ayou.eggguard.farm.pojo.ChickenFarm;
import com.ayou.eggguard.farm.service.ChickenFarmService;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChickenFarmServiceImpl implements ChickenFarmService {
    @Autowired
    private ChickenFarmMapper chickenFarmMapper;

    @Override
    public ChickenFarm getFarmByName(String farmName) {
        return chickenFarmMapper.getFarmByName(farmName);
    }

    @Override
    public void addFarm(ChickenFarm chickenFarm) {
        chickenFarmMapper.addFarm(chickenFarm);
    }

    @Override
    public void updateFarm(ChickenFarm chickenFarm) {
        chickenFarmMapper.updateFarm(chickenFarm);
    }

    @Override
    public List<ChickenFarm> getAllFarm() {
        return chickenFarmMapper.getAllFarm();
    }


}
